/*
题目链接:https://leetcode.cn/problems/transform-array-by-parity/description/
*/

//代码:

class Solution {
public:
    vector<int> transformArray(vector<int>& nums) {
        for(auto& x : nums) x &= 1;//偶数变0,奇数变1
        sort(nums.begin(),nums.end());
        return nums;
    }
};
